﻿Imports System.Data
Imports VSModel
Imports Cls_Common

Partial Class Control_Material_Detail
    Inherits System.Web.UI.UserControl
#Region "Sub and Function "
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            If Not Request.QueryString("Id") Is Nothing Then
                hidID.Value = Request.QueryString("Id")
                ShowData()
            End If
        End If
    End Sub
    Protected Sub ShowData()
        Dim data As New VSEntities
        Dim p As Material = (From q In Data.Materials Where q.Id = hidID.Value Select q).SingleOrDefault
        If Not p Is Nothing Then
            lblTitle.Text = IIf(IsNothing(p.Title) = True, "", p.Title)
        End If
    End Sub
#End Region
End Class
